package com.ssy.lingxi.order.repository;

import com.ssy.lingxi.order.entity.CountryAreaDO;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 省市区Jpa仓库
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-17
 */
@Repository
public interface CountryAreaRepository extends JpaRepository<CountryAreaDO, Long> {

    <T> List<T> findByLevel(Integer level, Sort sort, Class<T> tClass);

    <T> List<T> findByCodeIn(List<String> codes, Class<T> tClass);

    <T> List<T> findByParentCode(String parentCode, Sort sort, Class<T> tClass);
}
